package com.chat.push.push

import com.chat.base.WKBaseApplication
import com.chat.base.utils.WKDeviceUtils
import com.chat.push.service.PushModel
import com.hihonor.push.sdk.HonorMessageService

/**
 * 荣耀推送
 */
class HonorPushMsgService: HonorMessageService() {
    override fun onNewToken(pushToken: String?) {
        super.onNewToken(pushToken)
        if (!pushToken.isNullOrEmpty()) {
            val packageName = WKDeviceUtils.getInstance().getPackageName(WKBaseApplication.getInstance().context)
            PushModel.getInstance().registerDeviceHonorToken(pushToken, packageName)
        }
    }
}